//
//  ComplainAndAdviceStore.m
//  NewPro
//
//  Created by RYX on 2018/10/22.
//  Copyright © 2018年 何荧红. All rights reserved.
//

#import "ComplainAndAdviceStore.h"

@implementation ComplainAndAdviceStore

#pragma mark - 投诉与建议
- (void)postAdviceWithCustomId:(NSString *)customId andContent:(NSString *)content Success:(void(^)(void))success Failure:(void(^)(NSError *error))failure{
    
    NSString *url = [NSString stringWithFormat:@"%@/api/complaint/addComplaint",IP];
    
    NSDictionary *dic = @{
                          @"customId":customId,
                          @"content":content
                              };
    
    [HttpTool postUrlWithString:url parameters:dic success:^(id responseObject) {
        
        NSError *error = [HttpTool inspectError:responseObject];
        if (error == nil) {
            
            success();
        }else{
            
            failure(error);
        }
    } failure:^(NSError *error) {
       
        failure(error);
    }];
}
@end
